import { Provide } from '@midwayjs/core';
import { ISignOptions } from '../interface';

@Provide()
export class SignService {
  async getSign(options: ISignOptions) {
    let signUrl = '';
    switch (options.type) {
      case 'starbucks':
        break;
      case 'McDonald':
        signUrl = '../sign/mdl';
        break;
      default:
        signUrl = '../sign/starbucks';
        break;
    }
    const file = require(signUrl);
    return file.getSign(options.data, options.method);
  }
}
